<?php
    $options = array();
    $this->funeral_dir_profile = $this->user_profile;
    $options['picture_path'] = "/art/FD/".$this->funeral_dir_profile['photo'];
	$options['funeral_dir_profile'] = $this->funeral_dir_profile; 
    $options['action'] = $this->url( array('controller'=>'index', 'action'=>'fdmyaccount') );
        
    $form = new FuneralDirectorForm( $options );
	
    // run a validity check here.
    $is_valid = $form->isValid( $this->funeral_dir_profile );

    // populate the form with the profile data
    $form->populate( $this->funeral_dir_profile );

    // now that we've got the form populated (and optionally have error messages)
//    echo $form->render_with_template( "funeraldirectorprofile.xhtml" );
    echo $form;
 ?>

